﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using BLToolkit.Data;
using BLToolkit.Data.Linq;
using BLToolkit.DataAccess;

namespace Paaboo.Todo.Library
{
    public class TaskDB
    {
        public static Table<T> GetTable<T>() where T : class
        {
            using (var ctx = new DataContext("TaskMainDb"))
            {
                return ctx.GetTable<T>();
                
            }
        }

        public static SqlQuery<T> GetQuery<T>() where T : class
        {
            using (var db = new DbManager("TaskMainDb"))
            {
                return new SqlQuery<T>(db);
            }
        }
    }
}
